#ifndef __PATCH_H__
#define __PATCH_H__

#include "material.h"
#include "vector3D.h"
#include "ray.h"

namespace t2c2 {

class Patch {
public:
	
	virtual ~Patch(void);
	void set_material(Material*);
	Material* get_material(void) const;
	void set_id(const unsigned int);
	unsigned int get_id(void) const;
	
	virtual double area(void) const = 0;
	virtual Vector3D get_normal(const Vector3D&) const = 0; 
	virtual Vector3D get_sample_point(void) const = 0;
	virtual double intersection(const Ray&) = 0;
	
protected:
	Patch(void);
	Patch(Material*);
	Material* material;
	unsigned int id;
	
};

}

#endif
